package com.code.day08;

public class Day08Array {

    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5};
        FanZhuan( arr);
    }

    public static void FanZhuan(int[] arr) {
        int arr1[] = new int[arr.length];
        for (int i = 0; i < arr.length; i++) {
            arr1[i] = arr[arr.length-1-i];
        }
        for (int i = 0; i < arr1.length; i++){
            System.out.println(arr1[i]);
        }

        //增强for循环
        for (int i : arr1){
            System.out.println(i);
        }
    }
}
